package com.yuexinduo.education.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.yuexinduo.education.R;
import com.yuexinduo.baselibrary.base.BaseListAdapter;
import com.yuexinduo.education.view.CircleImageView;

import java.util.List;

public class TeacherBankAdapter extends BaseListAdapter {
    private Context mContext;
    public TeacherBankAdapter(Context context, List list) {
        super(context, list);
        this.mContext=context;
    }

    @Override
    public View initView(Object o, View convertView, ViewGroup parent, int pos) {
        ViewHolder mViewHolder;
        if (convertView == null){
            convertView = LayoutInflater.from(mContext).inflate(R.layout.item_tearher_bank,parent,false);
            mViewHolder = new ViewHolder();
            mViewHolder.itemBankHand = (CircleImageView) convertView.findViewById(R.id.item_bank_hand);
            mViewHolder.itemBankSubject = (TextView) convertView.findViewById(R.id.item_bank_subject);
            mViewHolder.itemBankRequest = (TextView) convertView.findViewById(R.id.item_bank_request);
            mViewHolder.itemBankType = (TextView) convertView.findViewById(R.id.item_bank_type);
            mViewHolder.itemBankAddress = (TextView) convertView.findViewById(R.id.item_bank_address);
            mViewHolder.itemBankTime = (TextView) convertView.findViewById(R.id.item_bank_time);

            convertView.setTag(mViewHolder);
        }else {
            mViewHolder = (ViewHolder) convertView.getTag();
        }
        return convertView;
    }

    class ViewHolder{
        private CircleImageView itemBankHand;
        private TextView itemBankSubject;
        private TextView itemBankRequest;
        private TextView itemBankType;
        private TextView itemBankAddress;
        private TextView itemBankTime;



    }
}
